<template>
	<view class="question-container tn-flex tn-flex-direction-row-reverse">
		<view class="avatar">
			<tn-avatar src="https://resource.tuniaokj.com/images/avatar/xiaomai4.jpg" size="sm"></tn-avatar>
		</view>
		<view class="content">
			<view class="user-name">
				<text>用户</text>
			</view>
			<view class="message">
				<rich-text :nodes="message.content"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		props: {
			message: {
				type: Object,
				default: function () {
					return {}
				}
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.avatar {
		margin-left: 20rpx;
		border-radius: 50%;
	}
	.content {
		.user-name {
			text-align: end;
			margin-bottom: 10rpx;
			color: #06070980;
		}
		.message {
			background-color: #9498f770;
			color: #060709cc;
			border-radius: 16rpx;
			padding: 24rpx 32rpx;
		}
	}
</style>